home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / DiskInit.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  5.3 KB  |  189 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DiskInit.a
  3. ;
  4. ;    Contains:    Disk Initialization Package ('PACK' 2) Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8.1
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1985-1995, 1997-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__DISKINIT__') = 'UNDEFINED' THEN
  18. __DISKINIT__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.  
  24. HFSDefaults                RECORD 0
  25. sigWord                     ds.b    2                ; offset: $0 (0)        ;  signature word 
  26. abSize                     ds.l    1                ; offset: $2 (2)        ;  allocation block size in bytes 
  27. clpSize                     ds.l    1                ; offset: $6 (6)        ;  clump size in bytes 
  28. nxFreeFN                 ds.l    1                ; offset: $A (10)        ;  next free file number 
  29. btClpSize                 ds.l    1                ; offset: $E (14)        ;  B-Tree clump size in bytes 
  30. rsrv1                     ds.w    1                ; offset: $12 (18)        ;  reserved 
  31. rsrv2                     ds.w    1                ; offset: $14 (20)        ;  reserved 
  32. rsrv3                     ds.w    1                ; offset: $16 (22)        ;  reserved 
  33. sizeof                     EQU *                    ; size:   $18 (24)
  34.                         ENDR
  35.  
  36. kHFSPlusDefaultsVersion            EQU        1
  37. HFSPlusDefaults            RECORD 0
  38. version                     ds.w    1                ; offset: $0 (0)        ;  version of this structure 
  39. flags                     ds.w    1                ; offset: $2 (2)        ;  currently undefined; pass zero 
  40. blockSize                 ds.l    1                ; offset: $4 (4)        ;  allocation block size in bytes 
  41. rsrcClumpSize             ds.l    1                ; offset: $8 (8)        ;  clump size for resource forks 
  42. dataClumpSize             ds.l    1                ; offset: $C (12)        ;  clump size for data forks 
  43. nextFreeFileID             ds.l    1                ; offset: $10 (16)        ;  next free file number 
  44. catalogClumpSize         ds.l    1                ; offset: $14 (20)        ;  clump size for catalog B-tree 
  45. catalogNodeSize             ds.l    1                ; offset: $18 (24)        ;  node size for catalog B-tree 
  46. extentsClumpSize         ds.l    1                ; offset: $1C (28)        ;  clump size for extents B-tree 
  47. extentsNodeSize             ds.l    1                ; offset: $20 (32)        ;  node size for extents B-tree 
  48. attributesClumpSize         ds.l    1                ; offset: $24 (36)        ;  clump size for attributes B-tree 
  49. attributesNodeSize         ds.l    1                ; offset: $28 (40)        ;  node size for attributes B-tree 
  50. allocationClumpSize         ds.l    1                ; offset: $2C (44)        ;  clump size for allocation bitmap file 
  51. sizeof                     EQU *                    ; size:   $30 (48)
  52.                         ENDR
  53.  
  54. ;
  55. ; pascal void DILoad(void )
  56. ;
  57.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  58.         Macro
  59.         _DILoad
  60.             moveq               #2,D0
  61.             move.w              D0,-(sp)
  62.             dc.w                $A9E9
  63.         EndM
  64.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  65.         IMPORT_CFM_FUNCTION DILoad
  66.     ENDIF
  67.  
  68. ;
  69. ; pascal void DIUnload(void )
  70. ;
  71.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  72.         Macro
  73.         _DIUnload
  74.             moveq               #4,D0
  75.             move.w              D0,-(sp)
  76.             dc.w                $A9E9
  77.         EndM
  78.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  79.         IMPORT_CFM_FUNCTION DIUnload
  80.     ENDIF
  81.  
  82. ;
  83. ; pascal short DIBadMount(Point where, UInt32 evtMessage)
  84. ;
  85.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  86.         Macro
  87.         _DIBadMount
  88.             moveq               #0,D0
  89.             move.w              D0,-(sp)
  90.             dc.w                $A9E9
  91.         EndM
  92.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  93.         IMPORT_CFM_FUNCTION DIBadMount
  94.     ENDIF
  95.  
  96. ;
  97. ; pascal OSErr DIFormat(short drvNum)
  98. ;
  99.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  100.         Macro
  101.         _DIFormat
  102.             moveq               #6,D0
  103.             move.w              D0,-(sp)
  104.             dc.w                $A9E9
  105.         EndM
  106.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  107.         IMPORT_CFM_FUNCTION DIFormat
  108.     ENDIF
  109.  
  110. ;
  111. ; pascal OSErr DIVerify(short drvNum)
  112. ;
  113.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  114.         Macro
  115.         _DIVerify
  116.             moveq               #8,D0
  117.             move.w              D0,-(sp)
  118.             dc.w                $A9E9
  119.         EndM
  120.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  121.         IMPORT_CFM_FUNCTION DIVerify
  122.     ENDIF
  123.  
  124. ;
  125. ; pascal OSErr DIZero(short drvNum, ConstStr255Param volName)
  126. ;
  127.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  128.         Macro
  129.         _DIZero
  130.             moveq               #10,D0
  131.             move.w              D0,-(sp)
  132.             dc.w                $A9E9
  133.         EndM
  134.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  135.         IMPORT_CFM_FUNCTION DIZero
  136.     ENDIF
  137.  
  138. ;    DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
  139. ;    FSM is part of Macintosh PC Exchange and System 7.5.
  140. ;
  141.  
  142. ;
  143. ; pascal OSErr DIXFormat(short drvNum, Boolean fmtFlag, unsigned long fmtArg, unsigned long *actSize)
  144. ;
  145.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  146.         Macro
  147.         _DIXFormat
  148.             moveq               #12,D0
  149.             move.w              D0,-(sp)
  150.             dc.w                $A9E9
  151.         EndM
  152.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  153.         IMPORT_CFM_FUNCTION DIXFormat
  154.     ENDIF
  155.  
  156. ;
  157. ; pascal OSErr DIXZero(short drvNum, ConstStr255Param volName, short fsid, short mediaStatus, short volTypeSelector, unsigned long volSize, void *extendedInfoPtr)
  158. ;
  159.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  160.         Macro
  161.         _DIXZero
  162.             moveq               #14,D0
  163.             move.w              D0,-(sp)
  164.             dc.w                $A9E9
  165.         EndM
  166.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  167.         IMPORT_CFM_FUNCTION DIXZero
  168.     ENDIF
  169.  
  170. ;
  171. ; pascal OSErr DIReformat(short drvNum, short fsid, ConstStr255Param volName, ConstStr255Param msgText)
  172. ;
  173.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  174.         Macro
  175.         _DIReformat
  176.             moveq               #16,D0
  177.             move.w              D0,-(sp)
  178.             dc.w                $A9E9
  179.         EndM
  180.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  181.         IMPORT_CFM_FUNCTION DIReformat
  182.     ENDIF
  183.  
  184.  
  185.  
  186.     ENDIF ; __DISKINIT__ 
  187.  
  188.